/*
  Author: xiaokai 
        - email: xiaokai.c@foxmail.com 
        - gitee: https://gitee.com/xiaokaiC
*/ 

#ifndef dotMap_h
#define dotMap_h

#include <Arduino.h>

#define PIXEL_WIDTH   32  //Dot-matrix screen pixel width
#define PIXEL_HEIGHT  16  //Dot-matrix screen pixel height

class DotMapClass
{
public:
	DotMapClass(uint8_t (*cache)[PIXEL_WIDTH/8], uint8_t (*prepCache)[PIXEL_WIDTH/8]);
	void scrollCacheLeft(void); 
	void scrollCacheRight(void);
	void scrollCacheUp(void);
	void scrollCacheDown(void);
	bool isPrepCacheUpdate(void);
    void cleanOffset(void);

private:
	int     _ver_offset;                  /*for prepCache*/
	int     _hor_offset;                  /*for prepCache*/
	uint8_t (*_cache)[PIXEL_WIDTH/8];      
	uint8_t (*_prepCache)[PIXEL_WIDTH/8];  
};


#endif
